home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-13 | 3.5 KB | 83 lines | [TEXT/GEOL] |
- Item 1710599 13-Oct-89 10:55
-
- From: D2086 Efficient Field Svc, C Faith,PRT
-
- To: AU0008 Kopfwerk EDV SW Entwicklung
- MADA.EUROPE MacApp Dev Assoc Europe, E Carrasco
- D4684 Robins Analytics, S Robins,PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re: InsideOut and MacApp
-
- Tommi, Eric and Doug,
-
- I have also spent considerable time using MacApp and InsideOut together. I
- have developed the following set of classes:
-
- TDatabase - This is an abstract class that implements all the typical (i.e.
- found in most database engines) behavior.
-
- TISOApp - This is a subclass of TApplication that handles the changes needed
- when working with Inside Out as a document( ooh thats ugly). TISOApp
- constrains the application to one open InsideOut Database as well as some of
- the other things that need to be done, in particular opening from the finder,
- handling calls to DBIdle and the InsideOut debugger etc. It calls upon the
- TDatabase object to open or create itself so those actions are handled by the
- TDatabase object.
-
- TInsideOutDB - This is the subclass of TDatabase that is designed specifically
- for InsideOut. It is where the actual calls to InsideOut routines are made.
- It handles error checking and locking and releasing locks as well as all the
- other InsideOut specific needs.
-
- TDBHandler - Since most interaction with InsideOut is via views (for lurkers:
- views are essentially record types which can be inserted into or retrieved from
- the database the can include fields of many different files at once with
- InsideOut assembling the correct parts automatically), and each view
- necessitates different calls to insideOut there needs to be some way to specify
- this for a given record type. TDBHandler is an abstract class that is
- subclassed for each type of view that one wishes to handle.
-
- Methods of TDBHandler can be as simple as simple as
-
- TSpecificHandler = OBJECT(TDBHandler)
-
- TSpecificHandler.ISpecificHandler;
- TSpecificHandler.Insert(theRec: recType);
- TSpecificHandler.Update(theRec: recType);
- TSpecificHandler.Get(theRec: recType);
- TSpecificHandler.Delete(theRec: recType);
- etc.
-
- END;
-
- What this does is allow the applications interface to the database to be very
- simple. All the actions specific to InsideOut calls are located inside this
- set of objects. TInsideOutDB knows the various viewRefNums for the open views
- and handles this part automatically.
-
- TDatabase contains a TList of the DBHandlers that are available to it at any
- given time so once a view is opened it can be used by other objects to access
- the view records of that type.
-
- I am still trying to smooth things up a bit but, these objects seem to be very
- easy to use and well suited to most tasks that I have put them to. I am using
- them for the implementation to the AppleLink Filing system I am doing for MADA.
- Hence the source will also be available through MADA in the future.
-
- I have also implemented a set of Dialog Entry Objects that make it very easy to
- implement a dialog that handles Add, Delete, Update, and Search with most of
- the work being the creation of the view.
-
- I am still working on some of the error handling aspects of these objects but
- on the whole they work reasonably well right now. I have tried to make them as
- generic as possible.
-
- Any suggestions for improvements or requests for features would be appreciated.
-
- Regards,
-
- Curtis
-
-